function isFlower(){
    var num = document.getElementById("flower").value;
    num2 = parseInt(num);
    var message = "no";
    if(num2>100 && num2<999){
        var a = num2%10;
        num2 = parseInt(num2/10);
        var b = num2%10;
        num2 = parseInt(num2/10);
        var c = num2;
        if(a*a*a + b*b*b + c*c*c == parseInt(num)){
            message = "yes";
        }
    }
    window.alert(message);
}

function add(){
    var a = parseFloat(document.getElementById("a1").value);
    var b = parseFloat(document.getElementById("a2").value);
    document.getElementById("a3").value = a+b;
}
function minus(){
    var a = parseFloat(document.getElementById("b1").value);
    var b = parseFloat(document.getElementById("b2").value);
    document.getElementById("b3").value = a-b;
}
function mult(){
    var a = parseFloat(document.getElementById("c1").value);
    var b = parseFloat(document.getElementById("c2").value);
    document.getElementById("c3").value = a*b;
}
function divi(){
    var a = parseFloat(document.getElementById("d1").value);
    var b = parseFloat(document.getElementById("d2").value);
    if(b==0){
        window.alert("除数不能为0！")
    }else{
        document.getElementById("d3").value = a/b;
    }
}
function power(){
    var a = parseFloat(document.getElementById("e1").value);
    var b = parseFloat(document.getElementById("e2").value);
    document.getElementById("e3").value = Math.pow(a,b);
}

function zString(){
    var s = document.getElementById("stringZ").value;
    var ss = new Array();
    for(var i=0;i<s.length;i++){
        for(var j=1;j<s.length;j++){
            if(j+i<=s.length){
                ss.push(s.substr(i,j));
            }
        }
    }
    window.alert(ss);
}